function isDate (day,month,year) {
// checks if date passed is valid
// will accept dates in following format:
// isDate(dd,mm,ccyy), or
// isDate(dd,mm) - which defaults to the current year, or
// isDate(dd) - which defaults to the current month and year.
// Note, if passed the month must be between 1 and 12, and the
// year in ccyy format.

    var today = new Date();
    year = ((!year) ? today.getYear()+1900:year);
    month = ((!month) ? today.getMonth():month-1);
    if (!day) return false
    var test = new Date(Date.UTC(year,month,day));
    if ( (test.getUTCFullYear() == year) &&
         (month == test.getMonth()) &&
         (day == test.getDate()) && 
         (parseInt(year)>=1900) )
		return true;
	else
		return false
}

function isEmail(email){
	l=email.lastIndexOf("@");
	f=email.indexOf("@");
	p=email.lastIndexOf(".");
	if( l!=-1 && l==f && l>p)
		return false;
	return true;
}